package com.simple.datax.db.mybatis.model;

import java.io.Serializable;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 
 * @author paladin
 * 
 */
public class DataxEnterpriseChannel extends DataxEnterpriseChannelKey implements
		Serializable {
	private Long sysReceiveId;

	private Long sysSendId;

	private Short flag;

	private static final long serialVersionUID = 1L;

	public Long getSysReceiveId() {
		return sysReceiveId;
	}

	public void setSysReceiveId(Long sysReceiveId) {
		this.sysReceiveId = sysReceiveId;
	}

	public Long getSysSendId() {
		return sysSendId;
	}

	public void setSysSendId(Long sysSendId) {
		this.sysSendId = sysSendId;
	}

	public Short getFlag() {
		return flag;
	}

	public void setFlag(Short flag) {
		this.flag = flag;
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		DataxEnterpriseChannel other = (DataxEnterpriseChannel) that;
		return (this.getEntCode() == null ? other.getEntCode() == null : this
				.getEntCode().equals(other.getEntCode()))
				&& (this.getServiceCode() == null ? other.getServiceCode() == null
						: this.getServiceCode().equals(other.getServiceCode()))
				&& (this.getSysReceiveId() == null ? other.getSysReceiveId() == null
						: this.getSysReceiveId()
								.equals(other.getSysReceiveId()))
				&& (this.getSysSendId() == null ? other.getSysSendId() == null
						: this.getSysSendId().equals(other.getSysSendId()))
				&& (this.getFlag() == null ? other.getFlag() == null : this
						.getFlag().equals(other.getFlag()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((getEntCode() == null) ? 0 : getEntCode().hashCode());
		result = prime
				* result
				+ ((getServiceCode() == null) ? 0 : getServiceCode().hashCode());
		result = prime
				* result
				+ ((getSysReceiveId() == null) ? 0 : getSysReceiveId()
						.hashCode());
		result = prime * result
				+ ((getSysSendId() == null) ? 0 : getSysSendId().hashCode());
		result = prime * result
				+ ((getFlag() == null) ? 0 : getFlag().hashCode());
		return result;
	}

	public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}
}